<?php


include_once('Smarty.class.php');
$main_smarty = new Smarty;

include('config.php');
include(mnminclude.'html1.php');
include(mnminclude.'link.php');
include(mnminclude.'tags.php');
include(mnminclude.'group.php');
include(mnminclude.'user.php');
include(mnminclude.'csrf.php');
include(mnminclude.'smartyvariables.php');

// sidebar
$main_smarty = do_sidebar($main_smarty);
if($_REQUEST["email_address_C"]){
echo " :;: ";
// pagename	
define('pagename', 'enviado'); 
$main_smarty->assign('pagename', pagename);
			$email_to =  'danieltoro@bisclick.com';
			$email_to1 =  $_REQUEST["email_address_C"];
			

			$email_from =  $db->get_var("SELECT user_login FROM `" . table_users . "` WHERE `user_id` = '$current_user->user_id';");
			$email_subject = 'Formulario de contacto Bisclick: '.$_REQUEST["asunto"];
			$email_message = $_REQUEST["mensaje"];;
			$email_headers = "From: " . $email_to1 . "\r\nReply-To: " . $email_to1 . "\r\nContent-type: text/html \r\ncharset=iso-8859-1 \r\nContent-Transfer-Encoding: 7bit";
			//$email_headers = "From: " . $email_to1 . "\r\nReply-To: " . $email_to1 . "\r\n";
                        @mail($email_to, $email_subject, $email_message, $email_headers);
			
			// show 'message sent', click to continue or wait 5..4..3..2..1.. then redirect
			header('Location: ' . $return);
			$main_smarty->assign('tpl_center', $the_template . '/contacto_center');
$main_smarty->display($the_template . '/pligg.tpl');
}else{
define('pagename', 'Contacto'); 
$main_smarty->assign('tpl_center', $the_template . '/contacto_center');
$main_smarty->display($the_template . '/pligg.tpl');

}

// show the template


?>